package cn.iocoder.yudao.module.bpm.controller.admin.tohandle.flow.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;

import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;

/**
 * 审批流待办中心——流程flow表 Base VO，提供给添加、修改、详细的子 VO 使用
 * 如果子 VO 存在差异的字段，请不要添加到这里，影响 Swagger 文档生成
 */
@Data
public class BpmHandleFlowBaseVO {

    @Schema(description = "外部审批流id", example = "25227")
    private String extFlowId;

    @Schema(description = "标题", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "标题不能为空")
    private String title;

    @Schema(description = "发起者帐号", example = "sunwukong")
    private String senderUsername;

    @Schema(description = "发起者姓名", example = "孙悟空")
    private String senderName;

    @Schema(description = "发起时间")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime sendTime;

    @Schema(description = "结束时间")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime endTime;

    @Schema(description = "来源系统", example = "6072")
    private Integer sourceSystemId;

    @Schema(description = "来源审批url链接", example = "https://www.iocoder.cn")
    private String sourceUrl;

    @Schema(description = "流程状态")
    private Integer flowStatus;

    @Schema(description = "true 删除；false 有效", example = "false")
    private Boolean deleted = false;

}
